<template>
  <div class="home">
    <!-- 背景 -->
    <div class="behind"></div>
    <!-- logo -->
    <div class="logo-area">
      <div class="logo">
        <span>JUST</span>
        <span>DO</span>
        <span>IT.</span>
      </div>
      <p>想做就做，说干就干！</p>
    </div>
    <!-- 时钟 -->
    <ClockThumb />
    <!-- 内容 -->
    <div class="content">
      <ul>
        <li
          v-for="(item, index) in options"
          :key="index"
          @click="jumpToPages(item)"
        >
          {{ item }}
        </li>
      </ul>
    </div>
  </div>
</template>

<script>
import ClockThumb from '@/components/clock-thumb'
export default {
  name: 'Home',
  components: { ClockThumb },
  data () {
    return {
      options: ['今日待办', '日程安排', '重要事件']
    }
  },
  methods: {
    jumpToPages (which) {
      switch (which) {
        case '今日待办':
          this.$router.push({ name: 'todo' })
          break
        case '日程安排':
          this.$router.push({ name: 'date' })
          break
        case '重要事件':
          this.$router.push({ name: 'events' })
          break

        default:
          break
      }
    }
  }
}
</script>

<style lang="less">
.home {
  width: 100%;
  height: 100%;
  position: relative;
  // 背景
  .behind {
    width: 100%;
    height: 100%;
    background: url('~@/assets/images/灯泡.jpg') no-repeat;
    background-size: 100% 100%;
  }
  // logo
  .logo-area {
    position: absolute;
    top: 50px;
    right: 50px;
    cursor: default;
    .logo {
      height: 100px;
      line-height: 80px;
      span {
        font-size: 80px;
        font-weight: 700;
        color: #000;
        text-shadow: 0 0 0.2em rgba(165, 6, 115, 0.792);
        margin-left: 20px;
      }
    }
    p {
      position: absolute;
      right: 0;
      width: 300px;
      height: 36px;
      line-height: 36px;
      font-size: 30px;
      font-weight: 700;
      color: #000;
      padding-bottom: 10px;
      border-bottom: 3px solid #000;
      text-shadow: 0 0 0.2em rgba(165, 6, 115, 0.792);
      // font-style: oblique;
    }
  }
  .content {
    position: absolute;
    top: 350px;
    left: 850px;
    width: 600px;
    height: 320px;
    ul {
      width: 100%;
      height: 100%;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      li {
        width: 400px;
        height: 60px;
        background: rgba(79, 71, 106, 0.5);
        text-align: center;
        line-height: 60px;
        font-size: 30px;
        font-weight: 600;
        cursor: pointer;
        border-radius: 30px;
      }
    }
  }
}
</style>
